package top.eggcode.component.query.predicate;

import top.eggcode.component.query.model.Expression;
import top.eggcode.component.query.model.ExpressionImpl;

import java.util.List;

/**
 * Title: 普通谓语
 * Description: TODO
 * Date: 2021/9/15 20:10
 *
 * @author JiaQi Ding
 * @version 1.0
 */
public class OriginalPredicate extends AbstractPredicateImpl {

    private final Expression<String> expression;

    public OriginalPredicate(String expression) {
        this.expression = new ExpressionImpl<>(expression, String.class);
    }

    @Override
    public String render() {
        return (String) expression.getValue();
    }

    @Override
    public List<Expression<Boolean>> getExpressions() {
        return null;
    }

    @Override
    public String render(boolean isNegated) {
        return render();
    }
}
